<div class="container-fluid">
  <%= form_for [@driver, @address], :html => { :class => 'form-horizontal' } do |f| %>
  <legend><%= controller.action_name.capitalize %> address for <%=@driver.name%></legend>
  <div class="row-fluid">
    <div class="span12">
      <!--
      <div class="row-fluid">
        <div class="span12 bgcolor">
          <div class="alert alert-error">
            <a href="#" class="close" data-dismiss="alert">×</a>
            Error Messages.
          </div>
        </div>
      </div> -->
      <div class="row-fluid">
        <div class="span6">
          <label>Address type</label>
          <%= f.select :address_type_id, options_from_collection_for_select(AddressType.all, :id, :name), {}, :class => 'span12' %>
        </div>
        <div class="span6">
          <label>Contact name</label>
          <%= f.text_field :contact_name_1, :class => 'span12' %>
        </div>
        <!--/span-->
      </div>
      <!--/row-->
      <div class="row-fluid">
        <div class="span6">
          <label>Address 1</label>
          <%= f.text_area :address1, :rows => '3', :style => "width: 400px;" %>
        </div>
        <div class="span6">
          <label>Postal code</label>
          <%= f.text_field :postal_code, :class => 'span12' %>
        </div>
      </div>    
      <div class="row-fluid">
        <div class="span6">
          <label>City</label>
          <%= f.select :city_id, options_from_collection_for_select(City.all, :id, :name), {}, :class => 'span12' %>
        </div>
        <div class="span6">
          <label>State</label>
          <%= f.select :state_id, options_from_collection_for_select(State.all, :id, :name), {}, :class => 'span12' %>
        </div>
      </div>              
    </div>
  </div>
  <div class="form-actions">
    <%= f.submit 'Edit address', :class => 'btn btn-primary' %>
    <%= link_to 'Cancel', drivers_path, :class => 'btn' %>
  </div>
  <!--/row-->
  <% end %>
</div>
<!--/.fluid-container-->
